
// 列表分类
import { findHeadCategory } from '@/api/home'
const category = {
  namespaced: true,
  state: () => ({
    categoryList: []
  }),
  mutations: {
    setcategoryList (state, payload) {
      state.categoryList = payload
    }
  },
  actions: {
    async asyncsetcategoryList (ctx) {
      const res = await findHeadCategory()
      ctx.commit('setcategoryList', res.result)
    }
  }
}

export default category
